﻿//
// Created by Grishul Eugeny
//
// See license in License.txt
//

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NCommander.Core
{
	public abstract class Node
	{
		public abstract NodeType Type { get; }

		public abstract string Path { get; }
		public abstract Node Parent { get; }
		
		public Node Root
		{
			get
			{
				if( Parent != null )
					return Parent.Root;
				else
					return this;
			}
		}

		public override string ToString()
		{
			return Path;
		}
	}
}
